package com.topnav.mc.admin.entity.bean;

import com.topnav.mc.admin.entity.DeviceOnlineTotal;
import lombok.Data;

/**
 * @Author: kenny
 * @Date: 2023/10/31 15:19
 */
@Data
public class DeviceOnlineTotalBean extends DeviceOnlineTotal {

    private String deviceCode;
    private String deviceName;
    private String orgName;
    private String onlineStr;
    private Long onlineMin;
    private String userName;
    private Integer onLineCount;

    public String getOnlineStr(){
        if (this.getOnlineSec() == null){
            return null;
        }
        return String.valueOf(this.getOnlineSec()/60);
    }

    public Long getOnlineMin(){
        if (this.getOnlineSec() == null){
            return null;
        }
        return this.getOnlineSec()/60;
    }
}
